package com.molichuxing.services.infrastructure.service.impl;

import com.molichuxing.services.infrastructure.convertor.Convert;
import com.molichuxing.services.infrastructure.dao.SensitiveWordMapper;
import com.molichuxing.services.infrastructure.dto.response.response.SensitiveWordDto;
import com.molichuxing.services.infrastructure.service.SensitiveWordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 敏感词service
 * @author liuruifeng
 * @date 2019.11.18
 */
@Service("sensitiveWordService")
public class SensitiveWordServiceImpl implements SensitiveWordService {


    @Resource
    private SensitiveWordMapper sensitiveWordMapper;

    /**
     * 根据条件获取敏感词
     * @param paramMap
     * @return
     */
    @Override
    public List<SensitiveWordDto> getSensitiveWordByParam(Map<String, Object> paramMap) {
        return Convert.toSensitiveWordDtoList(sensitiveWordMapper.getSensitiveWordsByParam(paramMap));
    }
}
